<%@ page import="com.sptpc.exam.Question" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%-- 引入header.jsp --%>
<%@include file="header.jsp"%>

<form method="get" action="score.do">
    //自动生成试卷
    <c:forEach items="${sessionScope.questions}" var="q" varStatus="i">
        ${i.count}. ${q.question}   <%--生成题号及题目--%>
        <br>
        <c:set var="opis" value='${["a","b","c","d"]}'/>
        <c:forEach items="${q.options}" var="op" varStatus="j">
            <input type="radio" name="${q.id}" value="${opis[j.count - 1]}"/>   <%--生成单选radio--%>
            ${opis[j.count - 1]}. ${op}     <%--生成选项及选项内容--%>
            <br>
        </c:forEach>
    </c:forEach>
    <input type="submit" value="交卷">

</form>
</body>
</html>
